<template>
	<view class="title">
		<view class="title-left">
			<view class="rect" :style="{'background-color': skinColor.color_red}"></view>
			<text class="title-name" :style="{color: skinColor.color_1, 'font-size': titleSize + 'rpx'}">{{title}}</text>
		</view>
		<view class="more opac-actived" @tap="more" v-if="moreShow">
			<text class="more-text" :style="{color: skinColor.color_2}">{{moreText}}</text>
			<rd-icon name="arrow-right-circle" size="35" :color="skinColor.color_2"></rd-icon>
		</view>
	</view>
</template>

<script>
	import appMixin from '@/common/mixin/app.js';
	export default {
		mixins: [appMixin],
		props: {
			title: {
				type: String,
				default: ''
			},
			titleSize: {
				type: [String, Number],
				default: 32
			},
			moreShow: {
				type: Boolean,
				default: true
			},
			moreText: {
				type: String,
				default: '更多'
			}
		},
		methods: {
			more () {
				this.$emit('more')
			}
		}
	}
</script>

<style scoped>
	.title {
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
		padding: 40rpx 0;
	}
	.title-left {
		flex-direction: row;
		align-items: center;
	}
	.title .rect {
		width: 10rpx;
		height: 30rpx;
		margin-right: 10rpx;
	}
	.title .title-name {
		font-weight: bold;
	}
	.title .more {
		flex-direction: row;
		align-items: center;
		margin-right: 20rpx;
	}
	.title .more .more-text {
		font-size: 26rpx;
	}
</style>
